﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title th:text="${wbeParameter.name}">网站后台管理系统 </title>
    <link rel="shortcut icon" href="/resource/hospital.png">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/resource/css/assets/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/resource/css/assets/font-awesome.min.css"/>
    <link rel="stylesheet" href="/resource/css/assets/ace.min.css"/>
    <link rel="stylesheet" href="/resource/css/assets/ace-rtl.min.css"/>
    <link rel="stylesheet" href="/resource/css/assets/ace-skins.min.css"/>
    <link rel="stylesheet" href="/resource/css/style.css"/>
    <link rel="stylesheet" href="/resource/css/assets/ace-ie.min.css"/>
    <link rel="stylesheet" href="/resource/common/layui/css/layui-icon.css" media="all"/>
    <script src="/resource/js/assets/html5shiv.js"></script>
    <script src="/resource/js/assets/respond.min.js"></script>
    <script src="/resource/js/jquery-1.9.1.min.js"></script>
    <script src="/resource/js/assets/ace-extra.min.js"></script>
    <script type="text/javascript">window.jQuery || document.write("<script src='/resource/js/assets/js/jquery-1.10.2.min.js'>" + "<" + "script>");</script>
    <script src="/resource/js/assets/bootstrap.min.js"></script>
    <script src="/resource/js/assets/typeahead-bs2.min.js"></script>
    <script src="/resource/js/assets/excanvas.min.js"></script>
    <script src="/resource/js/assets/ace-elements.min.js"></script>
    <script src="/resource/js/assets/ace.min.js"></script>
    <script src="/resource/js/jquery.nicescroll.js" type="text/javascript"></script>
</head>

<body>
<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="/diplomaProjectAdmin" class="navbar-brand" style="padding: 20px">
                <small>
                    <span th:text="${wbeParameter.name}" style="font-weight: bolder"></span>
                </small>
            </a><!-- /.brand -->
        </div><!-- /.navbar-header -->
        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">
                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <span class="time"><em id="time"></em></span><span class="user-info"><small>欢迎光临,</small><span
                            th:text="${user.userName}"></span></span>
                        <i class="icon-caret-down"></i>
                    </a>
                    <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li><a title="个人信息" class="iframeurl changeInfo">
                            <i class="layui-icon layui-icon-username"></i>个人资料</a></li>
                        <li><a title="修改密码" class="iframeurl changePwd">
                            <i class="layui-icon layui-icon-password"></i>修改密码</a></li>
                        <li><a title="修改头像" class="iframeurl changeImg">
                            <i class="layui-icon layui-icon-picture"></i>修改头像</a></li>
                        <li class="divider"></li>
                        <li><a href="/logoutAdmin.do"><i class="icon-off"></i>退出</a></li>
                    </ul>
                </li>
                <li class="purple">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#"><img th:src="${user.imgUrl}"
                                                                                    style="width: 40px;height: 40px;border-radius: 50%"></a>
                </li>
            </ul>

        </div>
    </div>
</div>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>
        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {
                }
            </script>
            <div class="sidebar-shortcuts" id="sidebar-shortcuts">
                <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
                    <a class="btn btn-success" href="/diplomaProject">
                        <i class="layui-icon layui-icon-website"></i>
                    </a>
                    <a class="btn btn-info">
                        <i class="icon-pencil"></i>
                    </a>

                    <a class="btn btn-warning">
                        <i class="icon-group"></i>
                    </a>

                    <a class="btn btn-danger">
                        <i class="icon-cogs"></i>
                    </a>
                </div>
            </div><!-- #sidebar-shortcuts -->
            <div id="menu_style" class="menu_style">
                <ul class="nav nav-list" id="nav_list">
                    <li class="home">
                        <a href="javascript:void(0)" name="main.html" class="iframeurl" title="">
                            <i class="icon-home"></i><span class="menu-text"> 系统首页 </span></a>
                    </li>
                    <li th:each="menu:${menuInfo}" th:if="${menu.pId eq '0'}"><a href="#" class="dropdown-toggle">
                        <i th:class="${menu.icon}"></i><span class="menu-text" th:text="${menu.name}"> 系统管理 </span>
                        <b class="arrow icon-angle-down"></b></a>
                        <ul class="submenu">
                            <li class="home" th:each="sonMenu:${menuInfo}"
                                th:if="${sonMenu.pId eq menu.id}">
                                <a href="javascript:void(0)" th:name="${sonMenu.file}" th:title="${sonMenu.name}"
                                   class="iframeurl">
                                    <i class="icon-double-angle-right"></i><span th:text="${sonMenu.name}"></span></a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
            <script type="text/javascript">
                $("#menu_style").niceScroll({
                    cursorcolor: "#888888",
                    cursoropacitymax: 1,
                    touchbehavior: false,
                    cursorwidth: "5px",
                    cursorborder: "0",
                    cursorborderradius: "5px"
                });
            </script>
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left" data-icon1="icon-double-angle-left"
                   data-icon2="icon-double-angle-right"></i>
            </div>
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {
                }
            </script>
        </div>

        <div class="main-content">
            <script type="text/javascript">
                try {
                    ace.settings.check('breadcrumbs', 'fixed')
                } catch (e) {
                }
            </script>
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="/diplomaProjectAdmin">首页</a>
                    </li>
                    <li class="active"><span class="Current_page iframeurl"></span></li>
                    <li class="active" id="parentIframe"><span class="parentIframe iframeurl"></span></li>
                    <li class="active" id="parentIfour"><span class="parentIfour iframeurl"></span></li>
                </ul>
            </div>

            <iframe id="iframe" style="border:0; width:100%; background-color:#FFF;" name="iframe" frameborder="0"
                    src="/main"></iframe>


            <!-- /.page-content -->
        </div><!-- /.main-content -->

        <div class="ace-settings-container" id="ace-settings-container">
            <div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
                <i class="icon-cog bigger-150"></i>
            </div>

            <div class="ace-settings-box" id="ace-settings-box">
                <div>
                    <div class="pull-left">
                        <select id="skin-colorpicker" class="hide">
                            <option data-skin="default" value="#438EB9">#438EB9</option>
                            <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                            <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                            <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                        </select>
                    </div>
                    <span>&nbsp; 选择皮肤</span>
                </div>

                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar"/>
                    <label class="lbl" for="ace-settings-sidebar"> 固定滑动条</label>
                </div>

                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl"/>
                    <label class="lbl" for="ace-settings-rtl">切换到左边</label>
                </div>

                <div>
                    <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container"/>
                    <label class="lbl" for="ace-settings-add-container">
                        切换窄屏
                        <b></b>
                    </label>
                </div>
            </div>
        </div><!-- /#ace-settings-container -->
    </div><!-- /.main-container-inner -->

</div>
<!--底部样式-->
<div class="footer_style" id="footerstyle">
    <script type="text/javascript">try {
        ace.settings.check('footerstyle', 'fixed')
    } catch (e) {
    }</script>
    <p class="l_f">版权所有：<span th:text="${wbeParameter.name}"></span></p>
    <p class="r_f">@2022-2033</p>
</div>
<script type="text/javascript">
    $(function () {
        var cid = $('#nav_list> li>.submenu');
        cid.each(function (i) {
            $(this).attr('id', "Sort_link_" + i);

        })
    })
    jQuery(document).ready(function () {
        $.each($(".submenu"), function () {
            var $aobjs = $(this).children("li");
            var rowCount = $aobjs.size();
            var divHeigth = $(this).height();
            $aobjs.height(divHeigth / rowCount);
        });
        //初始化宽度、高度
        $("#main-container").height($(window).height() - 76);
        $("#iframe").height($(window).height() - 140);

        $(".sidebar").height($(window).height() - 99);
        var thisHeight = $("#nav_list").height($(window).outerHeight() - 173);
        $(".submenu").height();
        $("#nav_list").children(".submenu").css("height", thisHeight);

        //当文档窗口发生改变时 触发
        $(window).resize(function () {
            $("#main-container").height($(window).height() - 76);
            $("#iframe").height($(window).height() - 140);
            $(".sidebar").height($(window).height() - 99);

            var thisHeight = $("#nav_list").height($(window).outerHeight() - 173);
            $(".submenu").height();
            $("#nav_list").children(".submenu").css("height", thisHeight);
        });
        $(document).on('click', '.iframeurl', function () {
            var cid = $(this).attr("name");
            var cname = $(this).attr("title");
            $("#iframe").attr("src", cid).ready();
            $("#Bcrumbs").attr("href", cid).ready();
            $(".Current_page a").attr('href', cid).ready();
            $(".Current_page").attr('name', cid);
            $(".Current_page").html(cname).css({"color": "#333333", "cursor": "default"}).ready();
            $("#parentIframe").html('<span class="parentIframe iframeurl"> </span>').css("display", "none").ready();
            $("#parentIfour").html('').css("display", "none").ready();
        });


    });
    /******/
    $(document).on('click', '.link_cz > li', function () {
        $('.link_cz > li').removeClass('active');
        $(this).addClass('active');
    });
    /*********************点击事件*********************/
    $(document).ready(function () {
        $('#nav_list,.link_cz').find('li.home').on('click', function () {
            $('#nav_list,.link_cz').find('li.home').removeClass('active');
            $(this).addClass('active');
        });

//时间设置
        function currentTime() {
            var d = new Date(), str = '';
            str += d.getFullYear() + '年';
            str += d.getMonth() + 1 + '月';
            str += d.getDate() + '日';
            str += d.getHours() + '时';
            str += d.getMinutes() + '分';
            str += d.getSeconds() + '秒';
            return str;
        }

        setInterval(function () {
            $('#time').html(currentTime)
        }, 1000);
    });

    function link_operating(name, title) {
        var cid = $(this).name;
        var cname = $(this).title;
        $("#iframe").attr("src", cid).ready();
        $("#Bcrumbs").attr("href", cid).ready();
        $(".Current_page a").attr('href', cid).ready();
        $(".Current_page").attr('name', cid);
        $(".Current_page").html(cname).css({"color": "#333333", "cursor": "default"}).ready();
        $("#parentIframe").html('<span class="parentIframe iframeurl"> </span>').css("display", "none").ready();
        $("#parentIfour").html('').css("display", "none").ready();


    }
</script>
<script type="text/javascript" src="/resource/common/layui/layui.js"></script>
<script type="text/javascript">
    layui.use(['table', 'layer', 'laydate', 'form'], function () {
        var table = layui.table,
            $ = layui.$,
            layer = layui.layer,
            form = layui.form;
        //修改密码
        $('.changePwd').on('click', function () {
            layer.open({
                type: 2,
                shadeClose: false, //点击遮罩关闭层
                title: "修改密码",
                area: ['400px', '350px'],
                content: "/changePwd"
            });
        });
        //个人信息
        $('.changeInfo').on('click', function () {
            layer.open({
                type: 2,
                shadeClose: false, //点击遮罩关闭层
                title: "个人资料",
                area: ['460px', '460px'],
                content: "/userInfo"
            });
        });
        //修改头像
        $('.changeImg').on('click', function () {
            layer.open({
                type: 2,
                shadeClose: false, //点击遮罩关闭层
                title: "修改头像",
                area: ['400px', '350px'],
                content: "/changeImg"
            });
        });
    });


</script>
</body>
</html>

